<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div.box1{
            font-size: 50px;
            font-family: '微软雅黑';

            /* 
            text-decoration 设置文本修饰
                可选值：
                    none 什么都没有
                    underline 下划线
                    line-through 删除线
                    overline 上划线

            */
            text-decoration: underline red;
        }
        .box2{
            width: 200px;
            /* 
                while-space 设置网页如何处理空白
                    可选值：
                        normal 正常
                        nowrap 不换行(出现滚动条)
                        pre 保留空白
            */
            white-space: nowrap;
            /* 用overflow裁剪超出指定宽度的内容 */
            overflow: hidden;
            /* text-overflow:ellipsis 让溢出的内容变为省略号 */
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div class="box2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Necessitatibus impedit possimus magni iusto, aspernatur error beatae molestiae dolores quia eos voluptates veniam? Voluptatibus animi odio vitae beatae. Nemo, optio totam!</div>
    <div class="box1">
        今天天气真不错
    </div>
</body>
</html>